@extends('default.layouts.personalRegisterHF')
@section('title')个人会员注册页面@endsection
@section('headcss')
@parent
<link rel="stylesheet" href="{{asset('/default/css/personal/register.css')}}">
@endsection

@section('content')
{{--会员注册信息--}}
<div class="content">
    <div class="reg">
        <div class="regInfo">
            {{--输出全部错误信息--}}
            @if(count($errors)>0)
                <div class="errors">
                    <ul>
                        @if(is_object($errors))
                            @foreach($errors->all() as $error)
                                <li><span>{{$error}}</span></li>
                            @endforeach
                        @else
                            <li><span>{{$error}}</span></li>
                        @endif
                    </ul>
                </div>
            @endif
            {{--个人会员注册左边信息--}}
            <div class="rleft">
                <div class="rtop" id="selReg" >
                    <ul>
                        <li  class="active"><a>手机注册</a></li>
                        <li><a>邮箱注册</a></li>
                    </ul>
                </div>
                {{--个人邮箱注册--}}
                <div class="regcon" id="emailReg" style="display: none">
                    <form action="{{ url('personal/register') }}" method="post" name="emailForm" id="emailForm">
                        {!! csrf_field() !!}
                        <input type="hidden" name="openId" value="{{ $openId }}">
                        <input type="hidden" name="unionId" value="{{ empty($unionid) ? '' : $unionid}}">
                        <input type="hidden" name="openIdType" value="{{ empty($openIdType) ? '' : $openIdType }}">
                        <dl>
                            <dt><input name="username" id="username" type="text" placeholder="请输入用户名" tip="请输入用户名" value="{{ old('username') }}"/></dt>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt><input name="email" id="email" type="text" placeholder="请输入常用邮箱，如：123456@qq.com" tip="请输入常用邮箱" value="{{ old('email') }}"/></dt>
                            <dd  class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt><input name="password" id="password" type="password" placeholder="请输入密码"  tip="请输入密码" value="{{ old('password') }}"/></dt>
                            <dd  class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt><input name="password_confirmation" id="password_confirmation" type="password" placeholder="请确认密码"   tip="请确认密码"  value="{{ old('password_confirmation') }}"/></dt>
                            <dd  class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt style="width: 162px;"><input name="code" id="code" type="text" class="code"  placeholder="请输入验证码"   tip="请输入验证码"   value="{{ old('code') }}"/></dt>
                            <dd style=" width:90px; margin-right: 0px; margin-left: 5px; display: block">
                                <span class="getcode"><img  id="getcode" src="{{captcha_src()}}" alt="" onclick="this.src='{{captcha_src()}}' + Math.random()"></span>
                            </dd>
                            <dd style=" width:40px; margin-right: 0px; margin-left: 5px; display: block">
                                <span class="another"><a  onclick="document.getElementById('getcode').src='{{captcha_src()}}' + Math.random()">换一张</a></span>
                            </dd>
                            <dd  class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt><input name="agree" type="checkbox" class="agree" id="agree"  value="1" checked>
                                <label for="agree">我已看过并同意<a target="_blank" href="{{url('webcontent_agreement.html')}}">&lt;&lt;注册协议&gt;&gt;</a></label>
                            </dt>
                            <dd  class="errinfo"></dd>
                        </dl>
                        @if (old('agree') == '1' )
                          <script>$("#agree").attr('checked',true);</script>
                        @endif
                        <dl style=" height: 46px; margin-top: 5px;">
                            <dt><input name="reg" type="submit" class="sub" value="立即注册"/></dt>
                        </dl>
                    </form>
                </div>
                {{---------------------------------------------------------------------------------------------------------------------------------------------}}
                {{--个人手机注册--}}
                <div class="regcon"  id="mobileReg">
                    <form action="{{ url('personal/register') }}" method="post" name="mobileForm" id="mobileForm">
                        {!! csrf_field() !!}
                        <input type="hidden" name="openId" value="{{ $openId }}">
                        <input type="hidden" name="unionId" value="{{ empty($unionid) ? '' : $unionid}}">
                        <input type="hidden" name="openIdType" value="{{ empty($openIdType) ? '' : $openIdType }}">
                        <dl>
                            <dt><input name="mobile"  id="mobile" type="text" placeholder="请输入手机号码"   tip="请输入手机号码" value="{{ old('mobile') }}" /></dt>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt style="width: 162px;"><input name="mobCode" id="mobCode" type="text" class="code"  placeholder="请输入验证码" tip="请输入验证码" value="{{ old('mobCode') }}" /></dt>
                            <dd style="width: 130px; margin-right: 0px; display: block">
                                <input name="mobcode" id="mobcode" type="button" onclick="getModCode($(this),$('#mobile'))" class="mobcode" value="点击获取验证码" />
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt><input name="password" id="password" type="password" placeholder="请输入密码" tip="请输入密码" value="{{ old('mobCode') }}" /></dt>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt><input name="password_confirmation" id="password_confirmation" type="password" placeholder="请确认密码" tip="请确认密码" value="{{ old('mobCode') }}" /></dt>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt>
                                <input name="mobAgree" type="checkbox"   class="agree" value="1"  id="mobAgree" checked>
                                <label for="mobAgree">我已看过并同意<a target="_blank" href="{{url('webcontent_agreement.html')}}">&lt;&lt;注册协议&gt;&gt; </a></label>
                            </dt>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl style=" height: 46px; margin-top: 5px;">
                            <dt><input name="reg" type="submit" class="sub" value="立即注册"/></dt>
                        </dl>
                    </form>
                </div>
                {{---------------------------------------------------------------------------------------------------------------------------------------------}}
            </div>
            {{--个人会员注册右边信息--}}
            <div class="rright">
                <div class="accountInfo">
                    <div class="selLogin">
                        <span>已有账号，请<a href="{{url('personal/welcome')}}">登录</a></span>
                        <span>或使用第三方账号直接登录</span>
                    </div>
                    <ul>
                        @if(!empty(Site::get('personAppid')))
                            <li class="qq"><a href="{{ url("personal/qqlogin") }}">QQ登录</a></li>
                        @endif
                        @if(!empty(Site::get('mpPersonOpenAppID')))
                            <li class="weixin"><a href="{{ weiXinlogin('personal') }}">微信登录</a></li>
                        @endif
                    </ul>
                    <div class="work">
                        <span class="pjob">企业招聘?</span>
                        <span class="preg"><a href="{{url('company/register')}}">企业注册</a> </span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {{--塞子--}}
    <div class="stopper" style=" margin-top:115px;"></div>
</div>
@endsection

@section('footerjs')
    @parent
{{--JS信息--}}
<script>
    //短信验证发送
    var _token = "{{csrf_token()}}";
    var codeUrl = "{{ url('common/ajax_code') }}";
    var mobCodeUrl = "{{ url('personal/ajax_mob_code') }}";
    var imgCode = "{{captcha_src('code')}}" + Math.random();
</script>
<script type="text/javascript" src="{{asset('/default/js/jquery/jquery.validate.extend.js')}}"></script>
<script type="text/javascript" src="{{asset('/default/js/jquery/jquery.enplaceholder.js')}}"></script>
<script type="text/javascript" src="{{asset('/default/js/personal/register.js')}}"></script>
@endsection